#include <math.h>
#include <stdio.h>
#define ABS(X) _Generic((X), int:abs, float:fabs, double:fabsf)(X)

int main()
{
    int a = -1;
    float b = -0.5f;
    double c = -1;

    printf("%d\n", ABS(a));
    printf("%f\n", ABS(b));
    printf("%lf\n", ABS(c));
    return 0;
}